package com.czmh.etc.interpreter.entity.base;

/**
 * Created by Huangyk on 2019/6/4.
 */
public enum EnMessagetype {

    KeyRequest(9100),
    KeyResponse(9200),

    /// <summary>
    /// 卡信息变更请求
    /// </summary>
    CardInfoChangeRequest(9102),
    /// <summary>
    /// 卡信息变更返回
    /// </summary>
    CardInfoChangeResponse(9202),

    /// <summary>
    /// 青通联名卡补发申请
    /// </summary>
    CardReissueRequest(9112),
    /// <summary>
    /// 青通联名卡补发申请返回
    /// </summary>
    CardReissueResponse(9212),

    CardDelayRequest(9140),
    CardDelayResponse(9240),

    /// <summary>
    /// 青通卡用户信息查询
    /// </summary>
    CustomBindingInfoRequest(9127),
    CustomBindingInfoResponse(9227),

    /// <summary>
    /// 青通联名卡用户信息注册/修改/补录/注销申请
    /// </summary>
    CardUserInfoOperateRequest(9133),
    /// <summary>
    /// 青通联名卡用户信息注册/修改/补录/注销申请返回
    /// </summary>
    CardUserInfoOperateResponse(9233),

    /// <summary>
    /// 青通联名卡车辆信息注册/修改/补录申请
    /// </summary>
    CardCarInfoOperateRequest(9134),
    /// <summary>
    /// 青通联名卡车辆信息注册/修改/补录申请返回
    /// </summary>
    CardCarInfoOperateResponse(9234),

    CustomInfoRequest(9128),
    CustomInfoResponse(9228),

    /// <summary>
    /// 费率查询
    /// </summary>
    FeeRuleRequest(9132),
    FeeRuleResponse(9232),

    /// <summary>
    /// OBU信息变更
    /// </summary>
    OBUInfoChangeRequest(9104),
    OBUInfoChangeResponse(9204),

    /// <summary>
    /// OBU信息查询
    /// </summary>
    OBUInfoRequest(9131),
    OBUInfoResponse(9231),

    /// <summary>
    /// OBU发行结果查询
    /// </summary>
    OBUIssuerResultRequest(9126),
    OBUIssuerResultResponse(9226),

    OBUDelayRequest(9141),
    OBUDelayResponse(9241),

    /// <summary>
    /// 预充值请求
    /// </summary>
    PrechargeRequest(9106),
    PrechargeResponse(9206),

    PrechargeDetailRequest(9130),
    PrechargeDetailResponse(9230),

    /// <summary>
    /// 充值卡信息查询
    /// </summary>
    CardInfoRequest(9107),
    CardInfoResponse(9207),

    /// <summary>
    /// 圈存、圈提请求
    /// </summary>
    LoadRequest(9108),
    /// <summary>
    /// 圈存、圈提返回
    /// </summary>
    LoadResponse(9208),
    /// <summary>
    /// 圈存、圈提结果请求
    /// </summary>
    LoadResultRequest(9109),
    /// <summary>
    /// 因病存、圈提结果返回
    /// </summary>
    LoadResultResponse(9209),
    LoadDetailRequest(9129),
    LoadDetailResponse(9229),
    /// <summary>
    /// 储值卡圈存对账请求
    /// </summary>
    LoadCheckAccountsRequest(9120),
    /// <summary>
    /// 储值卡圈存对账确认
    /// </summary>
    LoadCheckAccountsResponse(9220),

    /// <summary>
    /// 挂失、解挂、注销请求
    /// </summary>
    LossRequest(9110),
    /// <summary>
    /// 挂失、解挂、注销返回
    /// </summary>
    LossResponse(9210),
    /// <summary>
    /// OBU挂失、解挂、注销申请
    /// </summary>
    OBULossRequest(9114),
    /// <summary>
    /// OBU挂失、解挂、注销申请返回
    /// </summary>
    OBULossResponse(9214),

    /// <summary>
    /// OBU设备更换请求
    /// </summary>
    OBUChangeRequest(9115),
    /// <summary>
    /// OBU设备更换请求返回
    /// </summary>
    OBUChangeResponse(9215),

    /// <summary>
    /// 记账卡使用状态变更请求
    /// </summary>
    DebitStatusChangeRequest(9117),
    /// <summary>
    /// 记账卡使用状态变成请求返回
    /// </summary>
    DebitStatusChangeResponse(9217),

    /// <summary>
    /// 确认注销请求
    /// </summary>
    CancelResultRequest(9111),
    /// <summary>
    /// 确认注销返回
    /// </summary>
    CancelResultResponse(9211),

    /// <summary>
    /// 记账卡划账扣款请求
    /// </summary>
    DebitDeductRequest(9118),
    /// <summary>
    /// 记账卡划帐扣款确认
    /// </summary>
    DebitDeductResponse(9218),

    ConsumeDetailRequest(9122),
    ConsumeDetailResponse(9222),

    /// <summary>
    /// 月结票据打印请求
    /// </summary>
    MonthSettleBillPrintRequest(9123),
    /// <summary>
    /// 月结票据打印确认
    /// </summary>
    MonthSettleBillPrintResponse(9223),
    /// <summary>
    /// 月结票据打印结果申请
    /// </summary>
    MonthSettleBillPrintResultRequest(9125),
    /// <summary>
    /// 月结票据打印结果确认
    /// </summary>
    MonthSettleBillPrintResultResponse(9225),

    /// <summary>
    /// 储值卡消费转账明细请求
    /// </summary>
    ConsumeTransferAccountsRequest(9124),
    /// <summary>
    /// 储值卡消费转账明细确认
    /// </summary>
    ConsumeTransferAccountsResponse(9224),
    
    /// <summary>
    /// OBU在线发行、激活申请报文
    /// </summary>
    OBUActivationRequest(9139),
    /// <summary>
    /// OBU在线发行、激活申请返回报文体
    /// </summary>
    OBUActivationResponse(9239), 
    
    /// <summary>
    /// 车牌校验申请报文
    /// </summary>
    VehicleCheckRequest(9138),
    
    /// <summary>
    /// 车牌校验申请返回报文体
    /// </summary>
    VehicleCheckResponse(9238);

    private int messageType;

    private EnMessagetype(int msgType){
        this.messageType = msgType;
    }

    public int getMessageType() {
        return messageType;
    }

    public void setMessageType(int messageType) {
        this.messageType = messageType;
    }

    public static EnMessagetype loadEnMessageTypeEnum(int messageType){

        for(EnMessagetype en : EnMessagetype.values()){
            if(en.getMessageType() == messageType){
                return en;
            }
        }

        return null;
    }

    @Override
    public String
    toString() {
        return (this.messageType + "");
    }
}
